package com.sia.springcloud.protocol.config;

import com.sia.springcloud.model.Device;
import com.sia.springcloud.model.Point;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Sirius
 * @Date: 2021/12/31 13:29
 * @Description: 数采相关API，通过该类调用开启数采方法和关闭数采方法
 **/
@Component
public class CollectApi {
    @Resource
    private CollectJobConfig collectJobConfig;

    /**
     * 开启数采
     *
     * @param device
     * @param pointList
     * @param destName
     * @return
     */
    public boolean startCollect(Device device, List<Point> pointList, String destName) {
        return collectJobConfig.startCollect(device, pointList, destName);
    }

    /**
     * 关闭数采
     *
     * @param device
     * @param pointList
     * @return
     */
    public void stopCollect(Device device, List<Point> pointList) {
        collectJobConfig.stopCollect(device, pointList);
    }


}
